package com.SmartCampus.system.service.impl;

import com.SmartCampus.system.mapper.ClazzMapper;
import com.SmartCampus.system.model.dto.clazz.ClazzQueryRequest;
import com.SmartCampus.system.model.entity.Clazz;
import com.SmartCampus.system.model.entity.Course;
import com.SmartCampus.system.service.ClazzService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author wangliang
* @description 针对表【clazz(班级表)】的数据库操作Service实现
* @createDate 2024-12-26 18:54:38
*/
@Service
public class ClazzServiceImpl extends ServiceImpl<ClazzMapper, Clazz>
    implements ClazzService {

    @Override
    public Page<Clazz> getAll(Page<Clazz> page, ClazzQueryRequest clazzQueryRequest) {
        QueryWrapper<Clazz> queryWrapper = new QueryWrapper<>();
        return page(page, queryWrapper);
    }

    @Override
    public Page<Clazz> getStudent(Page<Clazz> page, ClazzQueryRequest clazzQueryRequest, Long clazzId) {
        QueryWrapper<Clazz> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id", clazzId);
        return page(page, queryWrapper);
    }
}




